package org.igeek.config.filter;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Repository;

/**
 * @package org.igeek.config.filter
 * @Description 配置类
 * @Author LittlePunk [296526219@qq.ccom]
 * @Version 2022.1
 * @Date 2023/11/14 11:43
 */
/*@ComponentScan
*   1.basePackages属性:默认扫描路径
*   2.excludeFilters: 排除过滤器
*     type 排除扫描的类型  （基于注解排除，基于类型排除）
 *    value 排除扫描的内容  (Repository)
 *
 *    不扫描Repository注解：excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION,value = Repository.class)}
 *    不扫描UserService类型：excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION,value = Repository.class)}
*
 *  3.IncludeFilters属性:包含过滤器
 *     必须搭配useDefaultFilters=false   默认为true表示会一定会扫描到组件注解@Component
 *     只扫描userDao(不包含userService):
 *     includeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,value = UserDao.class)}
* */
@ComponentScan(
        basePackages = "org.igeek.config.filter"
        //excludeFilters = {@ComponentScan.Filter(type= FilterType.ANNOTATION,value = Repository.class)}
        //includeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,value = UserDao.class)},
        //useDefaultFilters=false
)
public class MyConfig {
}
